package com.shigu.admin.manager.bo;

/**
 * 简单分页条件查询
 * Created by zhaohongbo on 16/5/23.
 */
public class PageSearchBO {
    private Integer pageNo;

    public static int pageSize=20;

    private String keyword;

    private Integer totalPage;

    public Integer getPageNo() {
        return pageNo;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    public Integer getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(Integer totalPage) {
        this.totalPage = totalPage;
    }
    //由总记录数算出总页数
    public void calTotalPage(Integer totalCount) {
        totalPage = (totalCount + pageSize - 1) /pageSize;
    }
}
